<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>导航点击变换样式</title>
    <style>
        .first { background-color:#0000FF;}
    </style>
    <script type="text/javascript" src="static/sool/js/jquery-1.9.1.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function (){
            $("li").each(function(index){
                $(this).click(function(){
                    $("li").removeClass("first");
                    $("li").eq(index).addClass("first");
                });
            });

            $("#aaa tr").click(function(){
                var data = $(this).children().eq(0).text();
                alert(data);
            });


            $("input[name='ace']:checked").each(function(index, element) {
                var state = $(element).attr("state");
                if(state == 'Y') {
                    alert("包含成功的数据，不允许修改");
                }
            });


            var obj = [ 1, 2, 3, 4, 5 ];
            $.each(obj, function(key, val) {
                alert(key);
            });



        });
    </script>
</head>
<body>

<table id="aaa">
    <tr>
        <td>1.1</td>
        <td>1.2</td>
    </tr>
    <tr>
        <td>2.1</td>
        <td>2.2</td>
    </tr>
</table>

<ul>
    <li class="first"><a href="#">首页</a></li>
    <li><a href="#">列表</a></li>
    <li><a href="#">内容</a></li>
    <li><a href="#">联系</a></li>
    <li><a href="#">关于</a></li>
</ul>



</body>
</html>